package cn.wolfcode.luowowo.search.service.impl;

import cn.wolfcode.luowowo.search.domain.UserInfoTemplate;
import cn.wolfcode.luowowo.search.service.IUserInfoTemplateSearchService;
import cn.wolfcode.luowowo.search.service.repository.UserInfoTemplateRepository;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class UserInfoTemplateSearchServiceImpl implements IUserInfoTemplateSearchService {
    @Autowired
    private UserInfoTemplateRepository repository;
    //用户的更新或者保存操作
    public void saveOrUpdate(UserInfoTemplate userInfoTemplate) {
        repository.save(userInfoTemplate);//如果没有这个对象就是保存操作,有就是更新操作
    }

    public List<UserInfoTemplate> findByDestName(String name) {
        return repository.findByDestName(name);
    }
}
